package com.rmd.ai.grpc.service;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * <pre>
 *离线接口，耗时的服务
 * </pre>
 */
@jakarta.annotation.Generated(
    value = "by gRPC proto compiler (version 1.41.0)",
    comments = "Source: ability.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class RecordAiOfflineServiceGrpc {

  private RecordAiOfflineServiceGrpc() {}

  public static final String SERVICE_NAME = "com.rmd.ai.grpc.service.RecordAiOfflineService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<com.rmd.ai.grpc.service.Ability.RecordAsrRequest,
      com.rmd.ai.grpc.service.Ability.RecordAsrResponse> getAsrSpkMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "AsrSpk",
      requestType = com.rmd.ai.grpc.service.Ability.RecordAsrRequest.class,
      responseType = com.rmd.ai.grpc.service.Ability.RecordAsrResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<com.rmd.ai.grpc.service.Ability.RecordAsrRequest,
      com.rmd.ai.grpc.service.Ability.RecordAsrResponse> getAsrSpkMethod() {
    io.grpc.MethodDescriptor<com.rmd.ai.grpc.service.Ability.RecordAsrRequest, com.rmd.ai.grpc.service.Ability.RecordAsrResponse> getAsrSpkMethod;
    if ((getAsrSpkMethod = RecordAiOfflineServiceGrpc.getAsrSpkMethod) == null) {
      synchronized (RecordAiOfflineServiceGrpc.class) {
        if ((getAsrSpkMethod = RecordAiOfflineServiceGrpc.getAsrSpkMethod) == null) {
          RecordAiOfflineServiceGrpc.getAsrSpkMethod = getAsrSpkMethod =
              io.grpc.MethodDescriptor.<com.rmd.ai.grpc.service.Ability.RecordAsrRequest, com.rmd.ai.grpc.service.Ability.RecordAsrResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsrSpk"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.rmd.ai.grpc.service.Ability.RecordAsrRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.rmd.ai.grpc.service.Ability.RecordAsrResponse.getDefaultInstance()))
              .setSchemaDescriptor(new RecordAiOfflineServiceMethodDescriptorSupplier("AsrSpk"))
              .build();
        }
      }
    }
    return getAsrSpkMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static RecordAiOfflineServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<RecordAiOfflineServiceStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<RecordAiOfflineServiceStub>() {
        @java.lang.Override
        public RecordAiOfflineServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new RecordAiOfflineServiceStub(channel, callOptions);
        }
      };
    return RecordAiOfflineServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static RecordAiOfflineServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<RecordAiOfflineServiceBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<RecordAiOfflineServiceBlockingStub>() {
        @java.lang.Override
        public RecordAiOfflineServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new RecordAiOfflineServiceBlockingStub(channel, callOptions);
        }
      };
    return RecordAiOfflineServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static RecordAiOfflineServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<RecordAiOfflineServiceFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<RecordAiOfflineServiceFutureStub>() {
        @java.lang.Override
        public RecordAiOfflineServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new RecordAiOfflineServiceFutureStub(channel, callOptions);
        }
      };
    return RecordAiOfflineServiceFutureStub.newStub(factory, channel);
  }

  /**
   * <pre>
   *离线接口，耗时的服务
   * </pre>
   */
  public static abstract class RecordAiOfflineServiceImplBase implements io.grpc.BindableService {

    /**
     */
    public void asrSpk(com.rmd.ai.grpc.service.Ability.RecordAsrRequest request,
        io.grpc.stub.StreamObserver<com.rmd.ai.grpc.service.Ability.RecordAsrResponse> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsrSpkMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getAsrSpkMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                com.rmd.ai.grpc.service.Ability.RecordAsrRequest,
                com.rmd.ai.grpc.service.Ability.RecordAsrResponse>(
                  this, METHODID_ASR_SPK)))
          .build();
    }
  }

  /**
   * <pre>
   *离线接口，耗时的服务
   * </pre>
   */
  public static final class RecordAiOfflineServiceStub extends io.grpc.stub.AbstractAsyncStub<RecordAiOfflineServiceStub> {
    private RecordAiOfflineServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected RecordAiOfflineServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new RecordAiOfflineServiceStub(channel, callOptions);
    }

    /**
     */
    public void asrSpk(com.rmd.ai.grpc.service.Ability.RecordAsrRequest request,
        io.grpc.stub.StreamObserver<com.rmd.ai.grpc.service.Ability.RecordAsrResponse> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getAsrSpkMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   * <pre>
   *离线接口，耗时的服务
   * </pre>
   */
  public static final class RecordAiOfflineServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<RecordAiOfflineServiceBlockingStub> {
    private RecordAiOfflineServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected RecordAiOfflineServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new RecordAiOfflineServiceBlockingStub(channel, callOptions);
    }

    /**
     */
    public com.rmd.ai.grpc.service.Ability.RecordAsrResponse asrSpk(com.rmd.ai.grpc.service.Ability.RecordAsrRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getAsrSpkMethod(), getCallOptions(), request);
    }
  }

  /**
   * <pre>
   *离线接口，耗时的服务
   * </pre>
   */
  public static final class RecordAiOfflineServiceFutureStub extends io.grpc.stub.AbstractFutureStub<RecordAiOfflineServiceFutureStub> {
    private RecordAiOfflineServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected RecordAiOfflineServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new RecordAiOfflineServiceFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<com.rmd.ai.grpc.service.Ability.RecordAsrResponse> asrSpk(
        com.rmd.ai.grpc.service.Ability.RecordAsrRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getAsrSpkMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_ASR_SPK = 0;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final RecordAiOfflineServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(RecordAiOfflineServiceImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_ASR_SPK:
          serviceImpl.asrSpk((com.rmd.ai.grpc.service.Ability.RecordAsrRequest) request,
              (io.grpc.stub.StreamObserver<com.rmd.ai.grpc.service.Ability.RecordAsrResponse>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class RecordAiOfflineServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    RecordAiOfflineServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return com.rmd.ai.grpc.service.Ability.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("RecordAiOfflineService");
    }
  }

  private static final class RecordAiOfflineServiceFileDescriptorSupplier
      extends RecordAiOfflineServiceBaseDescriptorSupplier {
    RecordAiOfflineServiceFileDescriptorSupplier() {}
  }

  private static final class RecordAiOfflineServiceMethodDescriptorSupplier
      extends RecordAiOfflineServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    RecordAiOfflineServiceMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (RecordAiOfflineServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new RecordAiOfflineServiceFileDescriptorSupplier())
              .addMethod(getAsrSpkMethod())
              .build();
        }
      }
    }
    return result;
  }
}
